/**
 设备巡检接口
 **/
import { http } from "@/utils/http";

type ResultTable = {
  total?: number;
  data?: Array<any>;
};

/**
 设备巡检-巡检规则接口
 **/
// 查询巡检规则接口
export const queryInspectRule = (data?: object) => {
  return http.request<ResultTable>("post", "/erc/api/v1/checkRule/page", {
    data
  });
};
// 获取巡检规则详情接口
export const getInspectRule = (data?: String) => {
  return http.request("get", `/erc/api/v1/checkRule/getByCheckRuleNo/${data}`, {
    data
  });
};
// 新增巡检规则接口
export const addInspectRule = (data?: object) => {
  return http.request("post", "/erc/api/v1/checkRule/saveCheckRule", {
    data
  });
};
// 编辑巡检规则接口
export const editInspectRule = (data?: object) => {
  return http.request("post", "/erc/api/v1/checkRule/updateCheckRule", {
    data
  });
};
// 删除巡检规则接口
export const deleteInspectRule = (data?: String) => {
  return http.request("get", `/erc/api/v1/checkRule/delByCheckRuleNo/${data}`, {
    data
  });
};
// 获取巡检规则编号接口
export const getInspectRuleNo = (data?: object) => {
  return http.request("post", "/erc/api/v1/checkRule/getRuleNo", {
    data
  });
};
